<%-- 
    Document   : negozio
    Created on : 15-mag-2014, 14.58.01
    Author     : cloud
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Negozio virtuale</title>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script>
        $(".products").append("<a href='#'>" + "acquista" + "</a>";
        $(".products a").click(function(e) {
        e.preventDefault(); // stop normal link click
        $.post("getProdData", {p: $(this).attr("id")},
        function(xml) {
        $("#carrello").html(
        "<br />
        $("name", xml).text() +
        $("price", xml).text()
        );
        });
        });
        </script>
    </head>
    <body>
        <h1>Benvenuto!</h1>
    <h3>Selezionare i prodotti desiderati:</h3>
    <ol id="catalogo">
        <li id="1" class="products">Crema idratante giorno</li>
        <li id="2" class="products">Crema idratante notte</li>
    </ol>
    <P>CARRELLO</P>
    <P ID="carrello">vuoto</P>
    </body>
</html>
